package com.hh.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResultDTO {
    private Integer code;//编码  0：成功 1：失败
    private String msg;//自定义字符
    private Integer count;//影响的条数
    private Object data;

    public static ResultDTO getDto(int count,Object data){
        return ResultDTO.builder()
                .count(count)
                .data(data)
                .code(0)
                .build();
    }
}
